package com.design.lzr.strategy;

/**
 * 策略模式
 *
 * @author lzr
 * @date 2018/9/21
 */
public class Client {
    public static void main(String[] args) {
        Duck duck = new Duck();
        duck.setQuackBehavior(new QuackA());
        duck.performQuack();
        duck.setQuackBehavior(new QuackB());
        duck.performQuack();
    }
}
